import request from '@/utils/request'
// 获取Map
export function getPlanMap() {
    return request({
        url: `/api/v1/warehouse/checkplan/map`,
        method: 'GET',
    })
}
// 新建盘点计划
export function CheckPlanAdd(params) {
    return request({
        url: `/api/v1/warehouse/checkplan/add`,
        method: 'POST',
        data: params
    })
}
// 盘点List
export function CheckPlanList(params) {
    return request({
        url: `/api/v1/warehouse/checkplan/list`,
        method: 'POST',
        data: params
    })
}
//盘点详情
export function CheckPlanDetails(id){
    return request({
        url:`/api/v1/warehouse/checkplan/detail/${id}`,
        method:'GET',
    })
}
// 人员
export function departandStaffs(){ 
    return request({
        url:`/api/v1/member/normal_list`,
        method:'POST',
    })
}
// 开始盘点
export function checkplanStart(params) {
    return request({
        url: `/api/v1/warehouse/checkplan/start`,
        method: 'POST',
        data: params
    })
}
// 盘点表
export function checkplanResult(params) {
    return request({
        url: `/api/v1/warehouse/checkplan/result`,
        method: 'POST',
        data: params
    })
}
//导出盘点表
export function exportExcel(id){
    return request({
        url:`/api/v1/warehouse/checkplan/export/excel/${id}`,
        method:'GET',
    })
}
//保存盘点记录
export function checkplanSave(params){
    return request({
        url:`/api/v1/warehouse/checkplan/save`,
        method:'POST',
        data: params
    })
}
//提交盘点记录
export function checkplanSubmit(params,id){
    return request({
        url:`/api/v1/warehouse/checkplan/submit/${id}`,
        method:'POST',
        data: params
    })
}
//提交盘点记录
export function repeatCheck(params){
    return request({
        url:`/api/v1/warehouse/checkplan/repeat/check`,
        method:'POST',
        data: params
    })
}